#import <ansi/ansi.h>
#import <appkit/appkit.h>

int main(int argc,char argv[]){
  /*var*/
    int i;
    signed long encoding[256];
    NXStream *pNXStream;
  encoding[3]=0x0004;
  encoding[4]=0x0034;
  encoding[5]=0x0234;
  encoding[6]=0x1234;
  pNXStream=NXOpenMemory(NULL,0,NX_WRITEONLY);
  for(i=0;i<10;i++){
    NXPrintf(pNXStream,"%.3i/%.2x: %.4x\n",i,i,encoding[i]);
    printf(            "%.3i/%.2x: %.4x\n",i,i,encoding[i]);
    }
  NXSaveToFile(pNXStream,"NXPrintf");
  printf("The NXPrintf output is in ./NXPrintf\n");
  system("open NXPrintf");
  exit(0);
  }
